package com.controller;

import com.alibaba.fastjson.JSON;
import com.config.Data1;
import com.config.Data2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Properties {
    @Autowired
    private Data1 data1;
    @Autowired
    private Data2 data2;

    @RequestMapping("conf1")
    public String config() {

        return data1.getA() + "==" + data1.getB();
    }
    @RequestMapping("data2")
    public String configData2() {
        return data2.toString();
    }

    @RequestMapping("conf11")
    public String config11() {
//        return JSON.toJSONString(data1);
        return null;
    }
}

